<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>计算器</title>
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body ng-app="c" ng-controller="c1">
<table class="table table-hover">
	<caption>悬停表格布局</caption>
	<thead>
		<tr>
			<th>名称</th>
			<th>状态</th>
			<th>故事</th>
			<th>修改</th>
		</tr>
	</thead>
	<tbody>
		<tr ng-repeat="t in rs">
			<td>{{t.name}}</td>
			<td>{{t.status}}</td>
			<td>{{t.story}}</td>
			<td><button ng-click="update(t)">修改</button></td>
		</tr>
	</tbody>
</table>
<script>
var ap=angular.module("c",[]);
ap.controller("c1",function($scope){
	$scope.rs=[
		{name:'张三',status:'未开始',story:"1"},
		{name:'张五',status:'完成',story:"2"},
		{name:'张六',status:'关闭',story:"3"},
		{name:'张九',status:'进行中',story:"4"},
		{name:'张八',status:'未开始',story:"1"}
		]
	
	$scope.update=function(t){
		
		alert(t.name);
	}
	
});
</script>

</body>
</html>